package com.meituan.sdk.model.ddzh.common.pageQuerySession;

import com.meituan.sdk.annotations.ApiMeta;
import com.google.gson.reflect.TypeToken;
import javax.validation.constraints.NotBlank;
import java.lang.reflect.Type;
import com.meituan.sdk.internal.utils.JsonUtil;
import com.google.gson.annotations.SerializedName;
import javax.validation.constraints.NotNull;
import com.meituan.sdk.MeituanResponse;
import com.meituan.sdk.MeituanRequest;

/**
* 查询原北极星有效session
* This file was automatically generated.
*/
@ApiMeta(
    path = "/ddzh/common/datamigration/session/query",
    businessId = 58,
    apiVersion = "10000",
    apiName = "page_query_session",
    needAuth = false
)
public class PageQuerySessionRequest implements MeituanRequest<PageQuerySessionResponse> {
    /**
    * <p data-diff-id="ct-diff-id-8028f3fb-3698-4312-8837-61cc2bf7f4c3">原北极星的应用AppKey。</p>
    */
    @NotBlank(message = "appKey不能为空")
    @SerializedName("appKey")
    private String appKey;
    /**
    * <p data-diff-id="ct-diff-id-bdf7169e-7e60-4343-b483-f00d13034bc3">上一页的最后一条数据的IndexId；<br>假设上一页返回了5条数据，IndexId按先后顺序分别是1、2、3、4、5；<br>则当前页传递的IndexId应为5</p>
    */
    @NotNull(message = "lastIndexId不能为空")
    @SerializedName("lastIndexId")
    private Integer lastIndexId;
    /**
    * <p data-diff-id="ct-diff-id-47924376-9aa8-4a7a-b68b-e98319adeded">每页数量</p>
    */
    @NotNull(message = "pageSize不能为空")
    @SerializedName("pageSize")
    private Integer pageSize;

    public String getAppKey() {
        return appKey;
    }
    public void setAppKey(String appKey) {
        this.appKey = appKey;
    }
    public Integer getLastIndexId() {
        return lastIndexId;
    }
    public void setLastIndexId(Integer lastIndexId) {
        this.lastIndexId = lastIndexId;
    }
    public Integer getPageSize() {
        return pageSize;
    }
    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }


    @Override
    public MeituanResponse<PageQuerySessionResponse> deserializeResponse(String response) {
        Type type = new TypeToken<MeituanResponse<PageQuerySessionResponse>>(){}.getType();
        return JsonUtil.fromJson(response, type);
    }
    @Override
    public String serializeToJson() {
        return JsonUtil.toJson(this);
    }


    @Override
    public String toString() {
        return "PageQuerySessionRequest{" + "appKey=" + appKey + "," + "lastIndexId=" + lastIndexId + "," + "pageSize=" + pageSize + "}";
    }
}
